package com.ouheng.shop.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.ouheng.shop.dao.ProductRelevanceDao;
import com.ouheng.shop.domain.ProductRelevanceDO;
import com.ouheng.shop.service.ProductRelevanceService;



@Service
public class ProductRelevanceServiceImpl implements ProductRelevanceService {
	@Autowired
	private ProductRelevanceDao productRelevanceDao;
	
	@Override
	public ProductRelevanceDO get(Long id){
		return productRelevanceDao.get(id);
	}
	
	@Override
	public List<ProductRelevanceDO> list(Map<String, Object> map){
		return productRelevanceDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return productRelevanceDao.count(map);
	}
	
	@Override
	public int save(ProductRelevanceDO productRelevance){
		return productRelevanceDao.save(productRelevance);
	}
	
	@Override
	public int update(ProductRelevanceDO productRelevance){
		return productRelevanceDao.update(productRelevance);
	}
	
	@Override
	public int remove(Long id){
		return productRelevanceDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return productRelevanceDao.batchRemove(ids);
	}

	@Override
	public List<Long> listPPidByProductid(Long productid) {
		// TODO Auto-generated method stub
		return productRelevanceDao.listPPidByProductid(productid);
	}

	@Override
	public int removeByProductid(Long productid) {
		// TODO Auto-generated method stub
		return productRelevanceDao.removeByProductid(productid);
	}
	
}
